{{template "header" .}}
<title>添加文章 - 我的博客文章</title>
</head>
<body>
<div class="navbar navbar-default navbar-static-top bs-docs-nav">
    <div class="container">
    {{template "navbar" .}}
    </div>
</div>

<div class="container">
    <form class="form-horizontal" method="POST" action="/topic">
        <input type="hidden" name="type" value="add">
        <input type="hidden" name="tid" value="{{.tid}}">
        <div class="form-group">
            <label for="title" class="col-sm-2 control-label">文章标题:</label>
            <div class="col-sm-6">
                <input type="text" required class="form-control" id="title" name="title" value="{{.topicInfo.Title}}">
            </div>
        </div>
        <div class="form-group">
            <label for="content" class="col-sm-2 control-label">文章内容:</label>
            <div class="col-sm-6     ">
                <textarea name="content" id="content" cols="30" rows="10" class="form-control">{{.topicInfo.Content}}</textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-6">
                <button type="submit" class="btn btn-default">添加</button>
            </div>
        </div>
    </form>
</div>
</html>